1. Field of the Invention
The present invention relates to an error correction code adding apparatus and an error correcting apparatus for use with an equipment having a CODEC (coder/decoder) for compressing information by coding or obtaining original information by decoding the compressed information.
2. Description of the Prior Art
There has heretofore been proposed an apparatus called CODEC that compresses video data by the encode processing when video data is transmitted or recorded. The encoding of video data is standardized by video CODEC (coder/decoder) recommendation H.261 established on December, 1990 by Comite Consultatif International des Telegraphique et Telephonique (CCIT) under International Telecommunication Union (ITU).
The application of the moving image coding is in broadcasting, communication or the like by using a standard television receiver, a high-definition television receiver as a signal source and in the field of data storage as a local signal processing.
As a video format based on the recommendation H.261, there is known a CIF (common intermediate format) which can solve the problems of different television systems in the area (whole world) and which can make a communication between the CODECs. A resolution of a picture based on the CIF is 352 dots (horizontal direction) .times.288 dots (vertical direction).
Generally, in a coding unit of the video CODEC, input video data is encoded by an encoder, multiplexed and this data is temporarily stored in a transmission buffer. Thereafter, this data is encoded by a transmission encoder and transmitted as encoded bit string. In the decoding unit, video data of the coded bit string is decoded by a transmission decoder. After this data is temporarily stored in a reception buffer, this data is multiplexed and this data is decoded to provide an original video signal.
When video data of vehemently large amount is transmitted, such video data is compressed by the coding upon transmission. Then, upon reception, the video data that is compressed by the coding is decoded.
Therefore, the video CODEC is not limited to the video transmission and can be used when video data is recorded by a VTR, for example.
In particular, video data of the high definition television system that makes a remarkable development recently is different from video data of the standard television system and an amount thereof becomes enormous. Therefore, a technique in which video data is encoded and compressed upon recording and original video data is obtained by the decoding upon reproduction is an indispensable problem in order to reduce a recording cost considerably.
As one of methods for coding a television signal by this CODEC, there are known several methods of reducing an average bit number per pixel or reducing a sampling frequency in order to narrow a transmission band.
As a coding method for decreasing a sampling frequency, there are proposed a method of decimating video data to the half by sub-sampling and a method of transmitting a flag indicative of data at a sub-sampling point and a position of sub-sampling point used in the interpolation, i.e., sub-sampling points of upper and lower or left and right sampling points.
As one of the methods of reducing the average bit number per pixel, there is known a DPCM (differential pulse code modulation). Because a correlation of pixels in a television signal is high and a difference between pixels close to each other is small, the DPCM is adapted to quantize and transmit a difference signal.
As other coding method of reducing the average bit number per pixel, there is known such a method that a picture of one field is divided into very small blocks and an average value, a standard deviation and an encoded code of one bit per pixel are transmitted at every block.
According to the encoding method that reduces a sampling frequency by using the sub-sampling, the sampling frequency is reduced to the half. There is then the risk that an aliasing noise occurs. The DPCM cannot solve the problem that an error propagates to the succeeding decoding. Further, according to the method of coding digital data at the unit of blocks, there is then the drawback that a block distortion occurs at the boundary between adjacent blocks.
Therefore, the assignee of the present invention has previously proposed a high-efficiency coding apparatus in which a dynamic range determined by a maximum value and a minimum value of a plurality of pixels contained in a two-dimensional block is obtained and digital data is coded by a variable bit length adaptive to this dynamic range (see U.S. Pat. No. 4,703,352, issued Oct. 27, 1987 to Kondo).
FIG. 1 of the accompanying drawings is used to explain a previously-proposed technology of a variable bit length coding adaptive to the dynamic range, i.e., adaptive dynamic range coding (ADRC). In this case, the dynamic range is calculated at every two-dimensional block (4 lines .times.4 pixels=16 pixels).
The minimum level (minimum value) within the block is eliminated from input video data in which one sample is formed of 8 bits). The video data from which the minimum value is eliminated is quantized. This quantization is the process for converting the video data from which the minimum value is eliminated into a representative level. A permissible maximum value (referred to as a maximum distortion) of a quantization distortion occurred when this quantization is effected is set to a predetermined value, for example, 4.
FIG. 1A shows the case that the dynamic range (difference between a maximum value MAX and a minimum value MIN) is 8 (DR=8). In the case of DR=8, the center level 4 is set to the representative level L0 and therefore a maximum distortion E=4.
When 0.ltoreq.DR.ltoreq.8 is satisfied, the central level of the dynamic range is set to the representative level and quantized data need not be transmitted. Therefore, a required bit length Nb is 0. On the receiving side, the decoding is carried out in which the representative level L0 is set to be a decoded value from the minimum value MIN of the block and the dynamic range.
FIG. 1B shows the case of DR=17 in which representative levels L0=4 and L1=13 are determined respectively and the maximum distortion E becomes 4. There are two representative levels L0 and L1, Nb=1 is established. In the case of 9.ltoreq.DR.ltoreq.17, Nb=1 is established. The maximum distortion E becomes smaller as the dynamic range becomes narrower.
FIG. 1C shows the case of DR=35, wherein representative levels L0=4, L1=13, L2=22 and L3=31 are determined respectively, and E=4 is established. There are four representative levels L0 to L3, and Nb=2 is established. In the case of 18.ltoreq.DR.ltoreq.35, Nb=2 is established.
In the case of 36.ltoreq.DR.ltoreq.71, there are used eight representative levels L0 to L7. FIG. 1D shows the case of DR =71, in which representative levels are respectively determined as L0=4, L1=13, L2=22, L3=31, L4=40, L5=49, L6=58 and L7=67. In this case, Nb=3 is established in order to distinguish the eight representative levels L0 to L7.
In the case of 72.ltoreq.DR.ltoreq.143, there are used 16 representative levels L0 to L15. FIG. 1E shows the case of DR =143, in which representative levels are respectively determined as L8=76, L9=85, L10=94, L11=103, L12=12, L13=121, L14=130 and L15=139 (L0 to L7 are similar to earlier-noted values). In this case, Nb=5 is established in order to distinguish 32 representative levels L0 to L31. In actual practice, because input pixel data is quantized by 8 bits, the maximum value of the dynamic range is 255 and cannot be quantized into representative levels L28 to L31.
Since the television signal within one block has a correlation concerning the two-dimensional direction of the horizontal and vertical directions and a three-dimensional correlation concerning the time direction, the level of image data contained in the same block is changed with a small width in the stationary portion. Therefore, even when a dynamic range of data DT1 from which the minimum level MIN commonly shared by the pixel data within the block is removed is quantized by a quantization bit number less than the original quantization bit number, there hardly occurs a quantization distortion. By reducing the quantization bit number, a data transmission band width can be narrowed as compared with the original one.
In the above-mentioned high-efficiency coding apparatus, an error correction code and a synchronizing (sync.) code are uniformly added to the data on which various processings are effected in order to compress the data, i.e., MSB data, second MSB data, . . . , LSB data. Thereafter, such data is recorded on a recording medium through a recording system or transmitted through a transmission system.
When original data is decoded from recorded data or transmitted data, the framed data is analyzed into added data and coded data, whereafter each data is error-corrected. Thereafter, original data is decoded by interpolating data which is inverse coding or processed in a sub-sampling.
If the same error correction code is added to the data that is encoded by the ADRC or the like, i.e., such data is error-corrected uniformly, then when an error remains in the LSB data, the picture quality is not deteriorated so much. When, however, an error remains in the MSB data, there is then the disadvantage that a decoded image is greatly deteriorated in picture quality from a visual sense standpoint.
Furthermore, when the bits of the error correction code is increased, or a powerful error correction is carried out in order to reduce such deterioration of picture quality, there is then the disadvantage that transmission information is increased.